package cn.develop.server.commons;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.io.IOException;

/**
 * @author 1.
 * @version 1.0
 * @description:  全局异常处理器
 * @date 2024/3/2 22:31
 */
@RestControllerAdvice
public class GlobalExceptionProcessor {

    @ExceptionHandler(value = IOException.class)
    public ResVO HandleIOException(IOException e) {
        // TODO 日志记录
        e.printStackTrace();
        return ResVO.error("文件解析异常！");
    }
}
